home *** CD-ROM | disk | FTP | other *** search
- /* Actions */
- #define PSACTCREATE 0 /* Create activation */
- #define PSACTCLOSE 1 /* Close */
- #define PSACTCLEAR 2 /* Clear */
- #define PSACTSTARTUP 3 /* Run startup-file */
- #define PSACTFILE 4 /* Load File */
- #define PSACTRUN 5 /* Run File */
- #define PSACTFONT 6 /* Load Font */
- #define PSACTINTER 7 /* Interactive */
- #define PSACTPAUSE 8 /* Continue after Pause */
- #define PSACTWAIT 9 /* Wait for Subtask */
- #define PSACTAREXX 10/* Interpret ARexx-Command */
-
- /* GadgetID's */
- #define HORIZ_SCROLLER 1
- #define VERT_SCROLLER 2
- #define GAD_LEFT 3
- #define GAD_RIGHT 4
- #define GAD_UP 5
- #define GAD_DOWN 6
-
- /* Arexx Errors */
- #define STR_ID_WINDOW_OPEN 0
- #define STR_ID_WINDOW_CLOSE 1
- #define STR_ID_WINDOW_NONE 2
- #define STR_ID_PSFILE 3
- #define STR_ID_PAUSED 4
- #define STR_ID_ARGUMENT 5
- #define STR_ID_PAGE_OK 6
- #define STR_ID_PAGE_FIRST 7
- #define STR_ID_PAGE_HIGH 8
- #define STR_ID_PAGE_LOW 9
- #define STR_ID_RUNNING 10
- #define STR_ID_STRING 11
- #define STR_ID_QUIT 12
-
- /* Errors */
- #define OPT_COLORS 13
- #define OPT_CREATE 14
- #define OPT_PENS 15
- #define PUB_SAME 16
- #define PUB_SCREEN 17
-
- /* Menu Option ID's */
- #define MENU_NEW 0
- #define MENU_IFF 1
- #define MENU_PRINT 2
-
-
- #define PSNAME "POST."
- #define AREXXPORTNAME "POST"
- #define AREXXEXTENSION "post"
-
- #define STD_TEMPPATH "T:"
- #define STD_PUBSCREEN "Workbench"
- #define STD_STARTUP "POST:init.ps"
- #define STD_IFFNAME "Ram:Post???.iff"
-
- #define MAXFILENAME 256
-
- #define PRINT_DEVICE_ERROR 1
- #define PRINT_PORT_ERROR 2
-
- #define GotoPage_CANCEL 111
- #define GotoPage_OK 222
-
- #define ChoosePS_CANCEL 111
- #define ChoosePS_OK 222
-
- #define Options_CANCEL 111
- #define Options_OK 222
-
- #ifndef max
- #define max(a,b) (a>b?a:b)
- #endif
-
- struct WindowOptions
- {
- UWORD WndLeft, WndTop, WndWidth, WndHeight,
- WndZoomLeft, WndZoomTop, WndZoomWidth, WndZoomHeight;
- };
-
- struct ScreenOptions
- {
- UWORD ScrWidth, ScrHeight, ScrOverscanType;
- ULONG ScrDisplayID;
- BOOL ScrAutoScroll, custscreen;
- char pubscrname[MAXPUBSCREENNAME+1];
- };
-
- struct PostOptions
- {
- short width, height, xoff, yoff, xdpi, ydpi;
- int fonts, htone, vm, paths;
- int depth;
- char iffname[MAXFILENAME];
- int prden;
- BOOL centerpage, formfeed, allpages, bandrendering;
- int from, to, bandsize;
- };
-
- struct Options
- {
- char identify[5];
- int chk;
- BOOL graphiccard;
- int bufsize;
- char temppath[MAXFILENAME], lastdir[MAXFILENAME], lastfile[MAXFILENAME];
- struct List startuplist;
- struct ScreenOptions Screen;
- struct WindowOptions OutputWnd;
- struct PostOptions PostOpts;
- };
-
- struct PSmessage
- {
- struct Message ExecMessage;
- struct RexxMsg *rmsg;
- short action;
- int numofpages, from, to;
- char file[256];
- char directory[256];
- };
-
- struct startupnode
- {
- struct Node linknode;
- char name[MAXFILENAME];
- };
-
- struct PubScrNode
- {
- struct Node node;
- char name[MAXPUBSCREENNAME+1];
- };
-
- struct PubScrContext
- {
- struct Screen *pubscreen;
- BOOL ps_lock;
- BOOL got_pens;
- BOOL pens_ok;
- int depth;
- };
-
- extern struct PubScrContext pubscrcontext;
-
- extern UWORD ScrDepth;
-
- extern BOOL argprint, argiff,
- argcustomscreen, argwindow, argcon, pause, running, paused,
- blit_to_window, bandrendering, os_3, argfile;
- extern BOOL breakset, ftrapset, interactive, arexx, startup, argverbose;
- extern int arglen, prden, pden, ioerror, post_count;
-
- extern char pubscreenname[MAXPUBSCREENNAME+1], undobuff[MAXFILENAME],
- postpubscrname[MAXPUBSCREENNAME+1], windowtitle[80],
- *errstr, startdir[256];
-
-
- extern struct Options TempOptions, Options, NewOptions, PrintOptions,
- IffOptions, DefaultOptions;
-
- extern AREXXCONTEXT RexxStuff;
- extern struct RexxMsg *rmsg;
- extern ULONG signals, pause_signal, create_signal;
-
- extern BPTR errfh, confh;
- extern struct MsgPort *prport, *mainport, *renderport;
- extern struct PSparm parm;
- extern struct IntuiMessage *intmsg;
- extern struct BitMap bitmap, output_bitmap;
- extern struct ColorMap colormap;
- extern struct Screen *custscreen, *screen;
- extern struct Window *OutputWnd;
- extern APTR my_VisualInfo;
- extern struct PropInfo hscrollinfo;
- extern struct PropInfo vscrollinfo;
- extern struct Gadget hscrollgadg;
- extern struct Gadget vscrollgadg;
- extern struct Menu *menu0, *menu1, *menu2;
- extern int winxbase, winybase, winxsize, winysize, winxpos, winypos;
- extern struct Process *rendertask;
- extern struct Task *maintask;
- extern struct Library *PSbase, *AslBase, *GadToolsBase, *IconBase, *UtilityBase;
- extern struct IntuitionBase *IntuitionBase;
- extern struct GfxBase *GfxBase;
- extern struct ExecBase *SysBase;
- extern struct DosLibrary *DOSBase;
- extern int propen, retcode, errcode;
- extern int arec, page_number, number_of_pages;
-
- extern struct FileRequester *filereq, *filerequester, *fontrequester;
- extern struct WBStartup *_WBenchMsg;
-
- extern char titlewait[];
- extern char titlestart[];
- extern char titlerunning[];
- extern char titleinter[];
- extern char titlepaused[];
- extern char titlearexx[];
-
- extern int opt_number;
- extern char useopts[3][15];
- extern char saveopts[3][20];
- extern BOOL createerror;
- extern BOOL createerror;
- extern char version[];
- extern char newpubscreenname[];
- extern BOOL createerror;
- extern int iffseq;
-
-
- /* Assembler routines */
-
- extern void insertbreakmain(void);
- extern void deletebreakmain(void);
- extern void insertbreak(void);
- extern void deletebreak(void);
- extern void insertftrap(void);
- extern void deleteftrap(void);
-
- /* Prototypes */
-
- void __saveds __regargs flushpage(int, int);
- void __saveds __regargs copypage(int);
- void __saveds sigintmain(void);
- void __saveds sigint(void);
- void __saveds sigfpe(void);
- void __saveds SubTask(void);
-
- void okmsg(char *);
- int Menu_ScreenMode( void );
- void printpage(struct BitMap *);
- void iffpage(struct BitMap *);
- BOOL retrymsg(char *string);
- void tidyup(void);
- int strtoint(char **sp, int *ip);
- void sendmenu(int action, int, int, int, char *, char *);
-
- int main(int argc, char **argv);
- void ende(void);
- void close_libs(void);
- BOOL open_libs(void);
-
- void ReleaseNeededPens(struct PubScrContext *);
- void GetNeededPens(struct PubScrContext *);
-
- void errorende(void);
- int parse(int, struct RDArgs *);
- BOOL yesnomsg(char *);
- int splitpage(char *);
-
- void openscreen(void);
- BOOL openpubscreen(struct PubScrContext *, char *);
- void openwindow(void);
- void initbitmap(void);
- BOOL openconwin(void);
- void saveterminate(void);
- void closewindow(void);
- BOOL createactivation(void);
- void deleteactivation(void);
- void runstartupfiles(void);
- void setoptionsgadgets(int);
- void setmenu(void);
- void GetVisual(void);
- void FreeVisual(void);
- void LoadPostOptions(char *, struct Options *);
- void SavePostOptions(char *, struct Options *);
- void ProcessARexx(void);
- void set_scrollers(void);
- void get_scrollers(void);
- void do_gadgets(int, int);
- void do_blit(void);
- void do_screen(void);
- BOOL do_pubscreen(void);
- BOOL do_opts(void);
- void doopts_band(void);
- void doopts_allpages(void);
- void copy_options(struct Options *, struct Options *);
- void setopts(void);
- void sleep_OutputWnd(void);
- void awake_OutputWnd(void);
- void init_list(struct List *);
- void free_list(struct List *);
- void delete_tempfiles(void);
- int nextpage(void);
- int previouspage(void);
- int gotopage(int);
- void changedir(char *);
- void getpath(char *, char *);
- void getfullfilename(char *, char *, char *);
- void sendfile(int);
- struct Node *get_node(void);